package com.example.day1801;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

/**
 * @author Lenovo
 */
public class TxtToArrayListDemo {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("myCharStream\\TxtToArrayListDemo.java"));
        ArrayList<String> list = new ArrayList<String>();
        String line;
        while ((line=br.readLine())!=null) {
            list.add(line);
        }
        br.close();
        for (String s: list){
            System.out.println(s);
        }
    }
}
